package com.example.tibetanmedicinechest.controller;


import com.example.tibetanmedicinechest.model.Result;
import com.example.tibetanmedicinechest.service.ICaseService;
import com.example.tibetanmedicinechest.util.ResultUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import java.util.List;
import java.util.Map;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author 编程笨蛋
 * @since 2023-08-12
 */
@RestController
@RequestMapping("/case")
public class CaseController {
    @Autowired
    ICaseService iCaseService;
    @GetMapping("/getAllCase")
    public Result getAllCase(){
        List<Map<String, Object>> maps = iCaseService.selectAll();
        return ResultUtil.getSuccess(maps);
    }
}

